#pragma once

#include <SFML\Graphics.hpp>
#include "Player.h"
#include "Animation.h"
#include <iostream>
class Boss {
public:
	Boss();
	~Boss();

	void Initialize(sf::RenderWindow* win, Player* player, sf::Texture* walkImage, sf::Texture* hitBoxImage, sf::Texture* attackImage);
	void Update();
	void attack_player();
	void attack_ship();
	void Cleanup();

	void Spawn(float xPos, float yPos);
	bool IsBusy();
	void Destroy();
	sf::FloatRect GetRect();
	int health;
	float distanceX;
	float distanceY;
	float distanceXship;
	float distanceYship;
	float distanceXplayer;
	float distanceYplayer;
	float distancePlayer;
	float distanceShip;
	float radianShip;
	float radianPlayer;
	int m_health;
	sf::Texture* m_hitBoxImg;
	sf::Sprite* m_hitBox;
	sf::Sprite* m_sprite;
	sf::Sprite* m_attackSprite;
	float boss_speed;
	sf::Clock* m_clock;
	sf::Clock* m_chaseClock;
	sf::Clock* m_attackClock;

	bool playerDown;

private:
	sf::RenderWindow* m_renderWindow;
	
	sf::Texture* m_walkImg;

	Animation* m_walkAnimation;
	Animation* m_attackAnimation;

	sf::Time timeSinceLastFrame;
	sf::Time chaseTime;
	sf::Time m_attackTimer;
	bool clockRestarted;
	float playerAngle;
	float shipAngle;
	bool hasStartedChasing;
	
	Player* m_player;


	bool m_isBusy;

};

